#define _CRT_SECURE_NO_WARNINGS 1

#include"List.h"


void Test1()
{
	LTNode* plist = LTInit();
	LTPushBack(plist, 1);
	LTPushBack(plist, 2);
	LTPushBack(plist, 3);
	LTPushBack(plist, 4);
	LTPushBack(plist, 5);
	LTPrint(plist);
	LTDestory(plist);
	plist = NULL;
}

void Test2()
{
	LTNode* plist = LTInit();
	LTPushFront(plist, 1);
	LTPushFront(plist, 2);
	LTPushFront(plist, 3);
	LTPushFront(plist, 4);
	LTPushFront(plist, 5);
	LTPrint(plist);
	LTPopFront(plist);
	LTPrint(plist);
	LTPopBack(plist);
	LTPrint(plist);
	LTDestory(plist);
	plist = NULL;
}

void Test3()
{
	LTNode* plist = LTInit();
	LTPushFront(plist, 1);
	LTPushFront(plist, 2);
	LTPushFront(plist, 3);
	LTPushFront(plist, 4);
	LTPushFront(plist, 5);
	LTPrint(plist);
	LTNode* pos = LTFind(plist, 3);
	if (pos)
	{
		LTInsert(pos, 30);
		LTPrint(plist);
		LTDelete(pos);
	}
	LTPrint(plist);
	LTDestory(plist);
	plist = NULL;
}
int main()
{
	Test3();
	return 0;
}